﻿using System;
using Luna.Data;
using Luna.Data.Contacts;

namespace Luna.Services.Test
{
    public class TestCategoryData : TestReferenceData, ICategoryData
    {
        public string Name { get; set; }

        public string Description { get; set; }
    }

    public class TestReferenceData : IReferenceData, IEquatable<IReferenceData>
    {
        public DateTime? LastUpdate
        {
            get;
            set;
        }

        public string Google
        {
            get;
            set;
        }

        public DateTime? GoogleLastUpdate
        {
            get;
            set;
        }

        public int? Zohocrm
        {
            get;
            set;
        }

        public DateTime? ZohocrmLastUpdate
        {
            get;
            set;
        }

        public Connectors.ConnectorType? From
        {
            get;
            set;
        }

        public bool Validated
        {
            get;
            set;
        }

        public bool AlreadyPersisted
        {
            get;
            set;
        }

        public Guid PK
        {
            get;
            set;
        }

        public bool Equals(IReferenceData other)
        {
            return other != null && other.PK == PK;
        }

        public override bool Equals(object obj)
        {
            IReferenceData L_Obj = obj as IReferenceData;
            if (L_Obj != null)
            {
                return Equals(L_Obj);
            }
            else
            {
                return false;
            }
        }
    }
}